<?php 
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

?>
<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php global $option, $jbconfig; $Itemid = JRequest::getInt('Itemid'); ?>

<!--  For jatabs--> 
<script type="text/javascript" language="javascript">
//<![CDATA[
	document.writeln ('<link type="text/css" rel="stylesheet" href="<?php echo JURI::base()?>components/<?php echo $option;?>/css/ja_tabs/ja_tabs.css"/>');
	document.writeln ('<link type="text/css" rel="stylesheet" href="<?php echo JURI::base()?>components/<?php echo $option;?>/css/ja_tabs/style.css"/>');
//]]>
</script>
<script type='text/javascript' src='<?php echo JURI::base()?>components/<?php echo $option;?>/css/ja_tabs/ja_tabs.js'></script>

<!--  End For jatabs--> 
<div id="jobboard-content">
<div class="ja-tabswrap default">	
	<div id="myTab-joinnow" class="container">
		<div class="ja-tabs-title-top clearfix">			
			<ul class="ja-tabs-title">	
				<li><h3 class="ja-ico-0"><span><?php echo JText::_('Posting Plan');?></span></h3></li>						
				<li><h3 class="ja-ico-1"><span><?php echo JText::_('Search Resumes');?></span></h3></li>
				<?php if($jbconfig['currency']->get('mode', 'real_currency')=='special_currency'){?>
				<li><h3 class="ja-ico-1"><span><?php echo JText::_('Posting Credit');?></span></h3></li>
				<?php }?>
			</ul>
		</div>	
		
		<div class="ja-tab-panels-top" id="ja-tab-panels-top-joinnow">
			<!--BEGIN: Content of tab 0-->				

			<div class="ja-tab-content">
				<div class="ja-tab-subcontent">
					
					<table class="tablelist postingplanlist">
						<thead>
							<tr>
											
								<td class="sectiontableheader">
									<?php echo JText::_('Title'); ?>
								</td>
								
								<td width="15%" class="sectiontableheader">
									<?php echo JText::_('Posting amount'); ?>
								</td>
								<td width="15%" class="sectiontableheader" class="sectiontableheader">
									<?php echo JText::_('Cost'); ?>
									(<?php 
										if($jbconfig['currency']->get('mode', 'real_currency')=='real_currency'){
											echo $jbconfig['currency']->get('currency', '$');
									
										}
										else {
											echo $jbconfig['currency']->get('currency_symbol', 'Credit');
										}
									?>)
                                </td>
								<td width="10%" class="sectiontableheader">
									<?php echo JText::_('Buy now'); ?>
								</td>
							</tr>
						</thead>
						<tfoot>
						<tr>
							<td colspan="4">
								
							</td>
						</tr>
						</tfoot>
						<tbody>
							<?php
							if($this->list){
								foreach ($this->list as $type=>$items){
									if($type!='resume'){
									?>
								
										<tr class="row1">
											<th colspan="4"><?php echo $this->types[$type]; ?></th>
										</tr>
										<?php $n=count( $items );
										for ($k=0; $k < $n; $k++){
											$row = $items[$k];
											if ($k==0)
									      		$classname = 'first sectiontableentry'.(($k%2)+1);
									      	elseif ($k==$n-1)
									      		$classname = 'last sectiontableentry'.(($k%2)+1);
									      	else 
									      		$classname = 'sectiontableentry'.(($k%2)+1);
											JFilterOutput::objectHtmlSafe($row);
											$alias = JFilterOutput::stringURLSafe($row->title);
											
											$link = JRoute::_("index.php?option={$option}&view=japayment&layout=posting_plan_confirm&cid[]=$row->id&alias=$alias&Itemid=".$Itemid) ;				
												
											?>
											<tr class="<?php echo $classname; ?>">					
												<td>
													<span class="editlinktip hasTip" title="<?php echo $row->title; ?>::<?php echo $row->description; ?>">
													<?php	echo $row->title;	?></span>
												</td>					
												<td >
													<?php echo ($row->value==-1)?$row->temp_value:$row->value." ".JText::_('posts');?>
												</td>
												<td>
													<?php echo $row->price;?>
												</td>
												
												<td>
													<a href="<?php echo $link; ?>" title="Click here to Buy now"><?php echo JText::_("Buy now"); ?></a>
												</td>
											</tr>
											<?php
											
										}
										unset($this->list[$type]);
									}
								}
							}
							?>
						</tbody>
					</table>	
				
				</div>
			</div>
			<!--END: Content of tab 0-->			
			
			<!--BEGIN:  Content of tab 1-->			
			<div class="ja-tab-content">
				<div class="ja-tab-subcontent">
					<table class="tablelist postingplanlist">
						<thead>
							<tr>
											
								<td class="sectiontableheader">
									<?php echo JText::_('Title'); ?>
								</td>
								
								<td width="15%" class="sectiontableheader">
									<?php echo JText::_('Duration'); ?>
								</td>
								<td width="15%" class="sectiontableheader">
									<?php echo JText::_('Cost'); ?>
									(<?php 
										if($jbconfig['currency']->get('mode', 'real_currency')=='real_currency'){
											echo $jbconfig['currency']->get('currency', '$');
									
										}
										else {
											echo $jbconfig['currency']->get('currency_symbol', 'Credit');
										}
									?>)
                                </td>
								<td width="10%" class="sectiontableheader">
									<?php echo JText::_('Buy now'); ?>
								</td>
							</tr>
						</thead>
						<tfoot>
						<tr>
							<td colspan="4">
								
							</td>
						</tr>
						</tfoot>
						<tbody>
							<?php
							if($this->list){
								
								foreach ($this->list as $type=>$items){?>
									
									<?php $n=count( $items );
									for ($k=0; $k < $n; $k++){
										$row = $items[$k];
										if ($k==0)
									      		$classname = 'first sectiontableentry'.(($k%2)+1);
									      	elseif ($k==$n-1)
									      		$classname = 'last sectiontableentry'.(($k%2)+1);
									      	else 
									      		$classname = 'sectiontableentry'.(($k%2)+1);
										JFilterOutput::objectHtmlSafe($row);
										$alias = JFilterOutput::stringURLSafe($row->title);
										$link = JRoute::_("index.php?option={$option}&view=japayment&layout=posting_plan_confirm&cid[]=$row->id&alias=$alias&Itemid=".$Itemid) ;
									
											
										?>
										<tr class="<?php echo $classname; ?>">					
											<td>
												<span class="editlinktip hasTip" title="<?php echo JText::_( 'TITLE' );?>::<?php echo $row->title; ?>">
												<?php	echo $row->title;	?></span>
											</td>					
											<td>
												<?php echo ($row->value==-1)?$row->temp_value:$row->value." ".JText::_('days');?>
											</td>
											<td>
												<?php echo $row->price;?>
											</td>
											
											<td>
												<a href="<?php echo $link; ?>" title="Click here to Buy now"><?php echo JText::_("Buy now"); ?></a>
											</td>
										</tr>
										<?php
									}
								}
							}
							?>
						</tbody>
					</table>	
				</div>
			</div>
			<!--END: Content of tab 1-->	
			
			
			<!--BEGIN:  Content of tab 2-->			
			<div class="ja-tab-content">
				<div class="ja-tab-subcontent">
					<table class="tablelist postingplanlist">
						<thead>
							<tr>
											
								<td class="sectiontableheader">
									<?php echo JText::_('Title'); ?>
								</td>
								<td width="15%" class="sectiontableheader">
									<?php echo JText::_('Amount'); ?>
								</td>								
								<td width="15%" class="sectiontableheader">
									<?php echo JText::_('Cost'); ?>
									(<?php 
										
											echo $jbconfig['currency']->get('currency', '$');
									
										
									?>)
								</td>
								<td width="10%" class="sectiontableheader">
									<?php echo JText::_('Buy now'); ?>
								</td>
							</tr>
						</thead>
						<tfoot>
						<tr>
							<td colspan="4">
								
							</td>
						</tr>
						</tfoot>
						<tbody>
							<?php if($this->package_credits){ $n = count($this->package_credits);?>
								<?php foreach ($this->package_credits as $k=>$row){
									if ($k==0)
									      		$classname = 'first sectiontableentry'.(($k%2)+1);
									      	elseif ($k==$n-1)
									      		$classname = 'last sectiontableentry'.(($k%2)+1);
									      	else 
									      		$classname = 'sectiontableentry'.(($k%2)+1);
									JFilterOutput::objectHtmlSafe($row);									
									$alias = JFilterOutput::stringURLSafe($row->title);
									$link = JRoute::_("index.php?option={$option}&view=japayment&layout=credit_confirm&cid[]=$row->id&alias=$alias&Itemid=1000") ;
									?>
									<tr class="<?php echo $classname; ?>">
										<td width="50%">
											<label for="credit_id<?php echo $k?>"><?php echo $row->title;?></label>
										</td>
										<td width="20%">
											<?php echo $row->value;?>
										</td>
										<td width="20%">
											<?php echo $row->price;?>
										</td>
										<td>
											<a href="<?php echo $link; ?>" title="Click here to Buy now"><?php echo JText::_("Buy now"); ?></a>
										</td>
									</tr>
									
								<?php }?>
								
							<?php }?>
						</tbody>
					</table>	
				</div>
			</div>
			<!--END: Content of tab 2-->	
					
		</div>
	</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
//<![CDATA[
	//var box = {};
	var tabs  = null;
	
	var numberTab = <?php echo $this->tab;?>
	
	window.addEvent("domready", initTab);
	function initTab() {
		tabs = new JATabs("myTab-joinnow", {numbtab:numberTab, position:'top',mouseType:'click',animType:'animMoveHor',skipAnim:true,duration:5000,width:'100%',height:'auto',style:'default'});		
		//mbox = new MultiBox('mb', {useOverlay: true});									
	}	
//]]>															
</script>